<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="view/default/style/basic.css" />
<link rel="stylesheet" type="text/css" href="view/default/style/list.css" />
<title>在线商城</title>
</head>
<body>
{include file='default/public/header.html'}
<div id="sait">
    当前位置：<a href="./">首页</a>
  {foreach from=$FrontNav[0]->sait key=key item=value}
  &gt; <a href="?a=list&navid={$key}">{$value}</a>
  {/foreach} 
</div>

<div id="sidebar">
    <h2>{$FrontNav[0]->name}</h2>
    <ul style="margin:0 0 10px 0">
        {foreach from=$FrontNav[0]->child key=key item=value}
        <li><a href="?a=list&navid={$value->id}">{$value->name}(<span class="gray">{$value->count}</span>)</a></li>
        {/foreach}
    </ul>
    <h2>当月热销</h2>
    <div style="margin:0 0 10px 0">
        {foreach from=$hotGoods key=key item=value}
        <dl>
            <dt><a href="?a=details&navid={$value->nav}&goodsid={$value->id}"><img src="{$value->thumbnail}" style="width:100px;height:100px;"></a></dt>
            <dd class="price">￥{$value->price_sale}</dd>         
            <dd class="title"><a href="?a=details&navid={$value->nav}&goodsid={$value->id}">{$value->name}</a></dd>         
        </dl>
        {/foreach}
    </div>
    <h2>浏览记录</h2>
    <div style="margin:0 0 10px 0">
        {foreach from=$viewRecord key=key item=value}
        {if $key < 2}
            <dl>
                <dt><a href="?a=details&navid={$value.nav}&goodsid={$value.id}" target="_blank"><img src="{$value.thumbnail}" style="width:100px;height:100px;"></a></dt>
                <dd class="price">￥{$value.price}</dd>         
                <dd class="title"><a href="?a=details&navid={$value.nav}&goodsid={$value.name}" target="_blank">{$value.name}</a></dd>         
            </dl>
        {/if}
        {/foreach}
        <p><a href="?a=list&m=clearViewRecord">清空</a></p>
    </div>
</div>
<div id="main">
    <h2>商品筛选</h2>
    <div class="filter">
        <p>品牌：{if $smarty.get.brand}<a href="{$url}&brand=">全部</a>{else}<span>全部</span>{/if} 
        {foreach from=$listBrand key=key item=value}
        {if $smarty.get.brand == $key}
        <span>{$value}</span>
        {else}
        <a href="{$url}&brand={$key}">{$value}</a>
        {/if}
        {/foreach}
        </p>
        {foreach from=$listAttr key=key item=value}
        <p>{$key}:
        {if $smarty.get.attr}
        <a href="{$url}&attr=">全部</a>
        {else}
        <span>全部</span>
        {/if}
        {foreach from=$value key=k item=v}
        {assign var=attr value=$key:$v}
        {if $smarty.get.attr == $attr}
        <span>{$v}</span>
        {else}
        <a href="{$url}&attr={$attr}">{$v}</a>
        {/if}
        {/foreach}
        </p>
        {/foreach}
        <p>价格：{if $smarty.get.price}<a href="{$url}&price=">全部</a>{else}<span>全部</span>{/if} 
        {foreach from=$listPrice key=key item=value}
        {if $smarty.get.price == $key}
        <span>{$value}</span>
        {else}
        <a href="{$url}&price={$key}">{$value}</a>
        {/if}
        {/foreach}
        </p>
    </div>
    <h2>商品列表</h2>
    <div class="pro">
        {foreach from=$listGoods key=key item=value}
        <dl>
            <dt><a href="?a=details&navid={$value->nav}&goodsid={$value->id}" target="_blank"><img src="{$value->thumbnail_small}"></a></dt>
            <dd class="price"><strong>￥{$value->price_sale}</strong><del>￥{$value->price_market}</del></dd> 
            <dd class="title"><a href="?a=details&navid={$value->nav}&goodsid={$value->id}">{$value->name}</a></dd>
            <dd class="commend"><a href="?a=details&navid={$value->nav}&goodsid={$value->id}#commend" target="_blank">已有{$value->count}人评价</a> <span style="color:green">(当月销量 <strong>{$value->sales}</strong> {$value->unit})</span></dd>   
            <dd class="buy"><a href="?a=details&navid={$value->nav}&goodsid={$value->id}" target="_blank">购买</a> | <a href="###">收藏</a> | <a href="###">比较</a></dd>   
        </dl>
        {foreachelse}
        <p>没有任何数据</p>
        {/foreach}
    <div id="page">{$page}</div>
    </div>
</div>
{include file='default/public/footer.html'}
</body>
</html>